﻿using System;
using System.Collections.Generic;
using System.Text;

namespace daSyntaxAnalyser.SyntaxTree
{
    using daBase.Objects;

    public class ClassOfDefinitionElement : ClassDefinitionElement
    {
        private IdElement id;

        public IdElement Id { get { return id; } set { id = value; } }

        public ClassOfDefinitionElement(TokenInfo StartInfo, IdElement Id, List<TokenInfo> Comments)
            : base(StartInfo, Comments)
        {
            id = Id;
        }

        public override string ToString()
        {
            return string.Format("class of {0}", id);
        }

        protected override IEnumerator<ISyntaxTreeElement> CreateEnumerator()
        {
            yield return id;
        }
    }
}
